# 默认值参数只会在函数定义时创建一次一次一次
# 切片的话，如果索引超范围，不会引起IndexError
# 对单一变量赋值时，用逗号隔开的多个值自动打包成元组

# 奇怪案例1
# class Cube:
#     def __init__(self,length,width,height):
#         self.length = length
#         self.width = width
#         self.height = height
#
#     def get_volume(self):
#         return self.height*self.width*self.length
#
#     def get_area(self):
#         return 2*(self.length*self.height+
#                   self.height*self.width+
#                   self.width*self.length)
# # How to confirm two cubes being equal?????
# def is_equal(a,b):
#     if a.get_volume() == b.get_volume() and a.get_area() == b.get_area():
#         return True
#     else:
#         return False
#
# def is_equal_s(a,b):
#     assert isinstance(a,Cube)
#     assert isinstance(b,Cube)
#
#     if is_equal(a,b):
#         if any([a.length == b.length,a.length == b.width,
#                 a.length == b.height]):
#             return True
#         else:
#             return False
#     else:
#         return False
#
# if __name__ == '__main__':
#     cu1 = Cube(2,3,4)
#     cu2 = Cube(3,4,2)
#     print(is_equal(cu1,cu2))

# 奇怪案例2
# import time
# a = eval(input("A length:"))
# b = eval(input("A width:"))
# c = eval(input("A height:"))
#
# d = eval(input("B length:"))
# e = eval(input("B width:"))
# f = eval(input("B height:"))
#
# s = time.time()
#
# data_a = sorted([a,b,c])
# data_b = sorted([d,e,f])
# if data_a == data_b:
#     print(True)
# else:
#     print(False)
#
# e = time.time()
# print(f"It spent {round(e-s,6)} seconds.")






















